"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . import views

urlpatterns = [

    # 首页
    url(r'^$', views.index,name='myhome_index'),
    # 列表
    url(r'^goods/list/$', views.goodslist,name='myhome_goodslist'),
    # 详情
    url(r'^goods/info/$', views.goodsinfo,name='myhome_goodsinfo'),


    # 登录
    url(r'^login/$', views.login,name='myhome_login'),
    # 退出
    url(r'^logout/$', views.logout,name='myhome_logout'),
    # 注册
    url(r'^register/$', views.register,name='myhome_register'),
    # 检测手机号
    url(r'^checkphone/$', views.checkphone,name='myhome_checkphone'),
    # 发送验证码
    url(r'^sendmsg/$',  views.sendmsg,name="myhome_sendmsg"),
    # 获取城市数据
    url(r'^get/citys/$', views.getcitys, name='myhome_getcitys'),


    # 购物车添加
    url(r'^cart/add/$', views.cartadd, name='myhome_cartadd'),
    # 购物车列表页
    url(r'^cart/index/$', views.cartindex, name='myhome_cartindex'),
    # 购物车数量修改
    url(r'^cart/edit/$', views.cartedit, name='myhome_cartedit'),
    # 购物车商品删除
    url(r'^cart/del/$', views.cartdel, name='myhome_cartdel'),

    # 订单确认页
    url(r'^order/confirm/$', views.orderconfirm, name='myhome_orderconfirm'),
    # 订单创建
    url(r'^order/create/$', views.ordercreate, name='myhome_ordercreate'),
    # 订单支付
    url(r'^order/buy/$', views.orderbuy, name='myhome_orderbuy'),

    # 我的订单
    url(r'^myinfo/order/$', views.myinfo_order, name='myhome_myinfo_order'),
    # 删除订单
    url(r'^myinfo/order/del$', views.myinfo_order_del, name='myhome_myinfo_order_del'),
    # 我的收货地址
    url(r'^myinfo/address/$', views.myinfo_address, name='myhome_myinfo_address'),
    # 删除收货地址
    url(r'^myinfo/address/del/$', views.myinfo_address_del, name='myhome_myinfo_address_del'),
    # 设置默认收货地址
    url(r'^myinfo/address/default/$', views.myinfo_address_default, name='myhome_myinfo_address_default'),
    # 我的个人信息
    url(r'^myinfo/information/$', views.myinfo_information, name='myhome_myinfo_information'),

    # 收货地址添加
    url(r'^address/add/$', views.addressadd, name='myhome_addressadd'),
    # 收货地址获取
    url(r'^address/list/$', views.addresslist, name='myhome_addresslist'),





]
